package com.zhulanhua.blogs.domain.query;



import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class SortQuery {

    String sort;//排序规则第一个参数必须是asc或者desc

    public List<String> getList(){
        List<String> strings = new ArrayList<>();
        String[] s = sort.split(",");
        for (int i = 1;i < s.length;i++){
            strings.add(s[i]);
        }
        return strings;
    }
}
